/*
 * @Description: 群sop接口
 * @Author: lixianggang
 * @Date: 2023-01-03 10:30:22
 * @LastEditors: lixianggang
 * @LastEditTime: 2023-01-05 16:44:33
 */
import request from "@/utils/request";

// 查询任务列表
export function queryTaskList(params) {
  return request({
    url: "/admin/group/sop/list",
    method: "get",
    params,
  });
}

// 关联群聊
export function groupChatList(params) {
  return request({
    url: "/admin/group/sop/groupChatList",
    method: "get",
    params,
  });
}

// 创建规则-添加群聊
export function findGroupList(params) {
  return request({
    url: "/admin/wecom/group/chat/list",
    method: "get",
    params,
  });
}

// 新增群sop
export function addGroupSop(data) {
  return request({
    url: "/admin/group/sop",
    method: "post",
    data,
  });
}

// 查看群sop详情
export function queryGroupSop(taskId) {
  return request({
    url: "/admin/group/sop/" + taskId,
    method: "get",
  });
}

// 删除群sop
export function deleteGroupSop(taskId) {
  return request({
    url: "/admin/group/sop/" + taskId,
    method: "delete",
  });
}

// 修改状态
export function updateStatus(params) {
  return request({
    url: "/admin/group/sop/updateStatus",
    method: "get",
    params,
  });
}

// 编辑群sop
export function editGroupSop(data) {
  return request({
    url: "/admin/group/sop",
    method: "put",
    data,
  });
}

// 查询执行详情
export function getExecuteDetail(params) {
  return request({
    url: "/admin/group/sop/detail/list",
    method: "get",
    params,
  });
}

// 执行详情-群主
export function getGroupLeaderList(params) {
  return request({
    url: "/admin/group/sop/detail/groupMasterList",
    method: "get",
    params,
  });
}
